﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace TinyCinema.UI.Pages.Customer._Information
{
    /// <summary>
    /// Interaction logic for ListView.xaml
    /// </summary>
    public partial class ListView : Page
    {
        public ListView()
        {
            InitializeComponent();
            DataContext = Information.dataContext;
        }
        private void DataGrid_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            MainPage.pagInformation.FormViewModeHandle();
            Information.dataContext.IsEditable = false;
            Information.dataContext.IsViewModeEnable = false;
        }

        private void DataGrid_SelectedCellsChanged(object sender, SelectedCellsChangedEventArgs e)
        {
            //Information.dataContext.ChooseCustomerCommand.Execute((sender as DataGrid).SelectedItem as Data.Customer);
            Information.dataContext.CurrentViewIndex = (sender as DataGrid).SelectedIndex + 1;
        }

    }
}
